home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{8B1526C3-359E-11D3-8218-F4FE9524C302}#10.0#0"; "ADOC.ocx"
- Begin VB.Form Form1
- Caption = "Form1"
- ClientHeight = 3195
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 5835
- LinkTopic = "Form1"
- ScaleHeight = 3195
- ScaleWidth = 5835
- StartUpPosition = 3 'Windows Default
- Begin ADOC.ADOControl ADOControl1
- Height = 315
- Left = 840
- TabIndex = 2
- Top = 2280
- Width = 3735
- _ExtentX = 6588
- _ExtentY = 556
- LongRecCount = -1
- CursorLocation = 2
- PageSize = 10
- StayInSync = -1 'True
- End
- Begin VB.Label Label2
- Caption = "Label2"
- Height = 375
- Left = 720
- TabIndex = 1
- Top = 0
- Width = 3615
- End
- Begin VB.Label Label1
- Caption = "Label1"
- Height = 975
- Left = 840
- TabIndex = 0
- Top = 600
- Width = 3135
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub Form_Load()
- Me.Show
- Me.ADOControl1.ConnectString = ";dsn=fox;"
- 'Me.ADOControl1.CursorType = adOpenDynamic
- 'Me.ADOControl1.LockType = adLockOptimistic
- MsgBox (Me.ADOControl1.OpenRecordset("select * from abc"))
- 'MsgBox (Me.ADOControl1.FieldCount)
- Me.ADOControl1.Caption = Me.ADOControl1.FieldName(1)
- ' Dim x As New ADODB.Recordset
- ' Dim conn As New ADODB.Connection
- ' Set conn = Nothing
- ' Set conn = New ADODB.Connection
- ' conn.Open ";dsn=fox;"
- ' SQL = "select * from abc"
- ' With x
- ' Set .ActiveConnection = conn
- ' .CursorType = adOpenDynamic
- ' .LockType = adLockOptimistic
- ' .Open (SQL)
- ' End With
- ' Me.ADOControl1.Caption = x.Fields(1).Name
- End Sub
-